/*
 * Copyright 2008. Mount Sinai Hospital, Toronto, Canada.
 * 
 * Licensed under the Apache License, Version 2.0. You
 * can find a copy of the license at:
 * 
 * http://www.apache.org/licenses/LICENSE-2.0
 * 
 * IN NO EVENT SHALL MOUNT SINAI HOSPITAL BE LIABLE TO ANY PARTY FOR DIRECT, 
 * INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, INCLUDING LOST 
 * PROFITS, ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, 
 * EVEN IF MOUNT SINAI HOSPITAL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH 
 * DAMAGE.
 * 
 * MOUNT SINAI HOSPITAL SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTIES OF 
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE AND 
 * ACCOMPANYING DOCUMENTATION, IF ANY, PROVIDED HEREUNDER IS PROVIDED "AS IS". 
 * MOUNT SINAI HOSPITAL HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, 
 * UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 
 */

package com.sinai.mshab.format;


/**
 * Contains a list of defaults to be used in a {@link FormatPanel}. This list
 * is passed down to {@link FormattingContainer}s which do the real formatting.
 * 
 * @author serge
 * 
 */
public class FormatPanelDefaults {
	// the default direction.
	private Direction defaultLabelPosition = Direction.LEFT;

	// the default direction.
	private int defaultLeftLabelWidth = 150;

	/* Boring setters and getters below */

	public void setLeftLabelWidth(int defaultLeftLabelWidth) {
		this.defaultLeftLabelWidth = defaultLeftLabelWidth;
	}

	/**
	 * Returns default the width of the left labels in this panel.
	 * 
	 * @return the default width of the left labels in this panel.
	 */
	public int getLeftLabelWidth() {
		return defaultLeftLabelWidth;
	}

	/**
	 * Sets the default label direction. Use LEFT or TOP. If you need other
	 * directions, use {@link FormatPanel}'s addDecoration() instead.
	 * 
	 * @param defaultLabelPosition
	 */
	public void setLabelPosition(Direction defaultLabelPosition) {
		this.defaultLabelPosition = defaultLabelPosition;
	}

	/**
	 * Returns the default label position of widgets being added to this panel.
	 * 
	 * @return the default label position of widgets being added to this panel.
	 */
	public Direction getLabelPosition() {
		return defaultLabelPosition;
	}
}
